import React from 'react';
import { Route } from 'react-router'
import formModeStores from './stores';

import window from './util';
import CubeUtil from './cubeUtil';
import * as ModeForm from "./util/excelUtil";
import * as ModeList from "./util/searchUtil";
import './style';
import Docker from './components/index';
import DevDocker from './components/dev/index';
import { WeaLocaleProvider } from 'ecCom';
import ShareStore from './stores/list/ShareStore';
import * as ShareCom from './pages/batch-share';

import ExcelLayoutCom from './components/excel-layout';
import ReplyCom from './components/reply';
import CardStore from './stores/card';
import SearchStore from "./stores/list";
import { SingleShareDialog } from './pages/batch-share/Single';
import {InnerTabCard} from './components/card';
import {DetailImportDialog} from './components/card/DetailImport';
import { MapAddressDialog } from './components/cube-map';
import CustomDialog from './components/card/CustomDialog';
const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'cube');

window.cubeStore = formModeStores;
window.CubeUtil = CubeUtil;
window.ModeForm = ModeForm.modeForm;
window.modeForm = ModeForm.modeForm;
window.ModeList = ModeList.modeList;
module.exports =  {
  Route: (
    <Route path="cube">
      <Route path="dev" onEnter={getLocaleLabel} >
        <Route  path=":guid" component={ DevDocker }/>
      </Route>
      <Route path=":guid" onEnter={getLocaleLabel} component={Docker}></Route>
    </Route>
  ),
  store: formModeStores,
  common: {
    ShareStore,
    CardStore,
    SearchStore,
    ShareCom,
    ReplyCom,
    ExcelLayoutCom,
    //InnerTabCard,
    DetailImportDialog,
    SingleShareDialog,
    MapAddressDialog,
    CustomDialog
  }
}
